-- GENERATED SPELL FOR [Enslaved Doomguard] --


function spell0_21963(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21963', 18000, 1)
end

function spell1_21963(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(20754,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21963', 9000, 1)
end

function spell2_21963(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(11876,pUnit)
pUnit:RegisterEvent('Sorts_21963', 5338, 1)
end

function Sorts_21963(pUnit, Event)
local choix_sorts_21963 = math.random(0, 2)
if choix_sorts_21963 == 0 then
pUnit:RegisterEvent('spell0_21963', 1, 1)
end
if choix_sorts_21963 == 1 then
pUnit:RegisterEvent('spell1_21963', 1, 1)
end
if choix_sorts_21963 == 2 then
pUnit:RegisterEvent('spell2_21963', 1, 1)
end
end

function mob21963_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21963', math.random(1500, 3000), 1)
end

function mob21963_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21963_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21963_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21963, 1, 'mob21963_Action')
RegisterUnitEvent(21963, 2, 'mob21963_Leave')
RegisterUnitEvent(21963, 3, 'mob21963_Kill')
RegisterUnitEvent(21963, 4, 'mob21963_Die')
